find_package(OpenGL REQUIRED)
find_package(GLEW REQUIRED)

include_directories(${GUANTELETE_SOURCE_DIR}../include)
include_directories(${GUANTELETE_SOURCE_DIR}../../SFML-2.1/include)

link_directories(${CMAKE_CURRENT_SOURCE_DIR}/../../sfml-build/lib)
link_directories(${OPENGL_LIBRARY_DIRS})

add_definitions(${OPENGL_DEFINITIONS})

set(guantelete_SRCS main.cpp Game.cpp TextureCache.cpp InputManager.cpp Player.cpp AnimatedSprite.cpp)
add_executable(guantelete ${guantelete_SRCS})
if (MSVC)
	SET (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /MP")
    target_link_libraries(guantelete
        debug sfml-graphics-d debug sfml-window-d debug sfml-system-d
        optimized sfml-graphics optimized sfml-window optimized sfml-system
        ${GLEW_LIBRARY} ${OPENGL_LIBRARY})
else (MSVC)
    target_link_libraries(guantelete
        debug sfml-graphics-s-d sfml-window-s-d sfml-system-s-d
        optimized sfml-graphics-s optimized sfml-window-s optimized sfml-system-s
        ${GLEW_LIBRARY} ${OPENGL_LIBRARY} X11 Xrandr pthread jpeg)
endif (MSVC)

